<template>
    <div id="background">
        <el-container>
            <el-header id="geRenHeadPosition">
                <el-row type="flex" style="height:80%;display:flex;align-items: flex-end">
                    <el-col :xs="2" :sm="2" :md="2" :offset="1"  class="imgCol">
                        <img v-bind:src="backIcon" class="backSize" @click="back"/>
                    </el-col>
                    <el-col  :xs="6" :sm="6" :md="6" :offset="6" class="imgCol"> 
                        <span class="titleSize">个人中心</span>
                    </el-col>
                </el-row>
         
            </el-header>
            <el-main id="geRenMainPositon">
                 <el-row type="flex" class="zhongXinHeight">
                    <el-col  :xs="20" :sm="20" :md="20" :offset="1" class="imgCol">
                        <el-button class="mineBtn" @click="goToZhuYe">
                            个人主页                                                     
                        </el-button>
                    </el-col>
                    <el-col :xs="2" class="imgCol">
                        <i class="el-icon-arrow-right el-icon--right" @click="goToZhuYe"></i>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col class="imgCol">
                        <div class="line"></div>
                    </el-col>
                </el-row>
                 <el-row type="flex" class="zhongXinHeight">
                    <el-col  :xs="20" :sm="20" :md="20" :offset="1" class="imgCol">
                        <el-button class="mineBtn" @click="goToRenZhen">
                            实名认证                                                     
                        </el-button>
                    </el-col>
                    <el-col :xs="2" class="imgCol">
                        <i class="el-icon-arrow-right el-icon--right" @click="goToRenZhen"></i>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col class="imgCol">
                        <div class="line"></div>
                    </el-col>
                </el-row>
                 <el-row type="flex" class="zhongXinHeight">
                    <el-col  :xs="20" :sm="20" :md="20" :offset="1" class="imgCol">
                        <el-button class="mineBtn" >
                            会员身份                                                     
                        </el-button>
                    </el-col>
                    <el-col :xs="2" class="imgCol">
                        <i class="el-icon-arrow-right el-icon--right"></i>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col class="imgCol">
                        <div class="line"></div>
                    </el-col>
                </el-row>
                 <el-row type="flex" class="zhongXinHeight">
                    <el-col :xs="20" :sm="20" :md="20" :offset="1" class="imgCol">
                        <el-button class="mineBtn" @click="goToAddress">
                            我的收货地址                                                     
                        </el-button>
                    </el-col>
                    <el-col :xs="2" class="imgCol">
                        <i class="el-icon-arrow-right el-icon--right"  @click="goToAddress"></i>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col class="imgCol">
                        <div class="line"></div>
                    </el-col>
                </el-row>
            </el-main>
        </el-container>
    </div>
</template>
<script>
import backIcon from '../../assets/img/mine/geRenZhongXin/back.png'
export default {
    data(){
        return{
            backIcon:backIcon,
            normalHeight:document.documentElement.clientHeight,
        }
    },
    mounted(){
       var normalHeight=sessionStorage.getItem('normalHeight');

        var bg = document.getElementById("background");
       // normalHeight=document.documentElement.clientHeight;
        console.log("height:"+normalHeight);
        bg.style.height = normalHeight+"px";
        bg.style.backgroundColor = "#FFFFFF"
        bg.style.margin = "0px";

        var head=document.getElementById("geRenHeadPosition");
        var headHeight=normalHeight/30 *4 ;
        console.log("headHeight:"+headHeight);
        head.style.height=headHeight+"px";

        var main=document.getElementById("geRenMainPositon");
        var mainHeight=normalHeight/30 *26;
        console.log("mainHeight:"+mainHeight);
        main.style.height=mainHeight+"px";

    },
    methods:{
        back(){
            console.log("back:");
            this.$router.go(-1);
        },
        goToAddress(){
            this.$router.push({
                path:'/mine/address'
            })
        },
        goToZhuYe(){
            this.$router.push({
                path:'/mine/zhuYe'
            })
        },
        goToRenZhen(){
            this.$router.push({
                path:'/mine/renZhen'
            })
        }
    }
}
</script>
<style>
.el-main,.el-header,.el-footer{
    padding: 0px ;
}
#geRenHeadPosition{
    background-color: #53cdf5;
}
.zhongXinHeight{
  
    height: 10%;
}
.mineBtn{
    border-style: none;
    outline: none;
    width: 100%;
    text-align: left;
    border: none;
    background-color: rgb(255,255,255,0);
    color: #707070;
    font-size: 1em;
}
.line{
    width: 90%;
    height: 1px;
    background-color: #F0F0F0;
}
.imgCol{
    display:flex;
    align-items:center;
    justify-content:center
}
.backSize{
    height: 26px;
}
.titleSize{
    font-size:1.125em;
    color:#ffffff
}
@media screen and (max-height: 600px){
  .backSize{
      height: 22px;
  }
  .titleSize{
      font-size: 1em;
  }
}
</style>
